﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Hệ quản trị nội dung Noah</title>
    <script src="/admin/resources/js/common.js" type="text/javascript"></script>
    <link href="/admin/resources/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/admin/resources/css/tsc_ribbons.css" rel="stylesheet" type="text/css" />
    <link href="/admin/resources/css/tsc_lists.css" rel="stylesheet" type="text/css" />
    <link href="/admin/resources/css/tsc_accordion_toggle.css" rel="stylesheet" type="text/css" />
    <script src="/admin/resources/js/jquery1.7.2.js" type="text/javascript"></script>
    <script src="/admin/resources/js/tsc_accordion_toggle.js" type="text/javascript"></script>
    <style>
        
    </style>
    <script language="javascript">
        var createWindow = function (id, url, title, width, height, modal) {

            var _height = Ext.getBody().getViewSize().height;
            var _width = Ext.getBody().getViewSize().width;
            if (height > _height) {
                height = _height - 100;
            }

            if (width > _width) {
                width = _width - 100;
            }

            Ext.net.DirectMethods.CreateWindow(id, url, title, width, height, modal,
             {
                 //                 failure: onFailure,
                 before: function () {
                     //                     Ext.get('maskDiv').removeClass('x-hide-display');
                 },
                 success: function () {
                     //                     Ext.get('maskDiv').addClass('x-hide-display');
                 }
             }
            );
        }

        var createWindowDefault = function (id, url, title, modal) {
            Ext.net.DirectMethods.CreateWindowDefault(id, url, title, modal,
             {
                 //                 failure: onFailure,
                 before: function () {
                     // Ext.get('maskDiv').removeClass('x-hide-display');
                 },
                 success: function () {
                     //Ext.get('maskDiv').addClass('x-hide-display');
                 }
             }
            );
        }

        var closeWindow = function (wId) {
            wId.close();
        }
    </script>
    <style type="text/css">
        * { font-family: Tahoma; }
        .pnTitle { color: #333; }
        .pnTopTitle { color: #474747; }
        .x-menu-list-item { font-family: Tahoma; font-size: 11px; }
        .x-menu-floating { border-color: #cfcfcf; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        <ext:Viewport ID="Viewport1" runat="server" Layout="border">
            <Items>
                <ext:Panel ID="pnHeader" runat="server" Header="false" Region="North" Border="false"
                    Margins="0 0 0 0" Html="">
                    <Content>
                        <div id='header' style='height: 32px;'>
                            <div class='api-title'>
                                &nbsp;NOAH CMS 2013
                            </div>
                        </div>
                    </Content>
                </ext:Panel>
                <ext:Panel ID="Panel3" runat="server" Header="false" Region="South" Border="false"
                    Height="26" Margins="0 0 0  0">
                    <Content>
                        <div id='footer' style='height: 26px; font-size: 12px; line-height: 26px; color: #fff; text-align: right; font-family: MS Shell Dlg; background-image: url("/admin/resources/images/overlay.png");'>
                            <a href="http://noah.vn" target="_blank" style="font-family: tahoma; font-size: 11px; color: #fff; text-decoration: none;">&copy; Noah, corp 2012</a>
                        </div>
                    </Content>
                </ext:Panel>


                <ext:Panel ID="Panel2" runat="server" Collapsible="true" Layout="AccordionLayout"
                    AnimCollapse="true" Header="false" Region="West" Split="true" Width="150" Margins="5 0 5 5"
                    Border="true" Title="<b class='pnTopTitle'>Chức năng</b>">
                    <Items>

                        <ext:MenuPanel ID="MenuPanel1" runat="server" Border="false" Title="<b class='pnTitle'>Sản phẩm</b>">
                            <Menu ID="Menu3" runat="server">
                                <Items>
                                    <ext:MenuItem ID="MenuItem10" runat="server" Text="Danh mục sản phẩm" Icon="Newspaper">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'ProductCategory','Modules/newsevent/News/Default.aspx','Danh mục sản phẩm')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem11" runat="server" Text="Sản phẩm" Icon="Newspaper">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Product','Modules/newsevent/News/Default.aspx','Sản phẩm')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                </Items>
                            </Menu>
                        </ext:MenuPanel>

                        <ext:MenuPanel ID="mnuWebContent" runat="server" Border="false" Title="<b class='pnTitle'>Nội dung</b>">
                            <Menu ID="Menu2" runat="server">
                                <Items>
                                    <ext:MenuItem ID="MenuItem1" runat="server" Text="Tin bài" Icon="Newspaper">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'News','Modules/newsevent/News/Default.aspx','Tin bài')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem2" runat="server" Text="Menu tin bài" Icon="Page">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'NewsCategory','Modules/newsevent/NewsCategory/Default.aspx','Menu tin bài')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem4" runat="server" Text="Hình ảnh" Icon="Image">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Image','Modules/common/images/Default.aspx','Hình ảnh')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem29" runat="server" Text="Film" Icon="Film">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Videos','Modules/common/Videos/Default.aspx','Film')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem27" runat="server" Text="Liên kết" Icon="Link">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Links','Modules/common/Links/Default.aspx','Liên kết')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuSeparator>
                                    </ext:MenuSeparator>

                                    <ext:MenuItem ID="MenuItem5" runat="server" Text="Môn học" Icon="Page">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Subject','Modules/course/subject/Default.aspx','Môn học')" />
                                        </Listeners>
                                    </ext:MenuItem>

                                    <ext:MenuItem ID="MenuItem6" runat="server" Text="Khóa học" Icon="Page">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Course','Modules/course/course/Default.aspx','Khóa học')" />
                                        </Listeners>
                                    </ext:MenuItem>

                                    <ext:MenuItem ID="MenuItem7" runat="server" Text="Địa điểm" Icon="Page">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Location','Modules/course/location/Default.aspx','Địa điểm')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuSeparator>
                                    </ext:MenuSeparator>
                                    <ext:MenuItem ID="MenuItem9" runat="server" Text="Đăng ký" Icon="Star">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Registration','Modules/course/registration/Default.aspx','Đăng ký')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuSeparator>
                                    </ext:MenuSeparator>

                                    <ext:MenuItem ID="MenuItem128" runat="server" Text="File" Icon="Attach">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Files','modules/common/files/default.aspx','File')" />
                                        </Listeners>
                                    </ext:MenuItem>

                                </Items>
                            </Menu>
                        </ext:MenuPanel>
                        <%--Quản lí thị trường--%>

                        <ext:MenuPanel ID="mnuSystem" runat="server" Border="false" Title="<b class='pnTitle'>Hệ thống</b>"
                            Collapsible="false" FitHeight="true">
                            <Menu ID="Menu4" runat="server">
                                <Items>
                                    <ext:MenuItem ID="mnuCommonInfo" runat="server" Text="Cơ cấu tổ chức" Icon="Information">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'AgencyInfo','Modules/ManagermentMarket/CommonInformation/DepartmentInformation/Default.aspx','Cơ cấu tổ chức')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem3" runat="server" Text="Quản lý giao diện" Icon="Layout">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Themes','Modules/common/themes/Default.aspx','Quản lý giao diện')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem8" runat="server" Text="Cấu hình" Icon="Cog">
                                        <Listeners>
                                            <Click Handler="addTab(#{pnTabPanel},'Cofig','Modules/common/Config/Default.aspx','Cấu hình')" />
                                        </Listeners>
                                    </ext:MenuItem>
                                </Items>
                            </Menu>
                        </ext:MenuPanel>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel4" runat="server" Header="false" Layout="Fit" Region="Center"
                    Margins="5 5 5 0" BodyBorder="true" Border="true" BodyStyle="padding:0px;">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server">
                            <Items>
                                <ext:Button ID="btnAddNewArticle" runat="server" Text="Tạo mới" Icon="Add">
                                    <Menu>
                                        <ext:Menu ID="Menu1" runat="server">
                                            <Items>
                                                <ext:MenuItem Text="Tin bài" Icon="Newspaper">
                                                    <Listeners>
                                                        <Click Handler="createWindow('addOrEditNews','Modules/newsevent/News/addoredit.aspx','Tạo tin bài', 960,560, true)" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                                <ext:MenuItem Text="Sản phẩm" Icon="Newspaper">
                                                    <Listeners>
                                                        <Click Handler="createWindow('addOrEditProduct','Modules/product/product/addoredit.aspx','Tạo sản phẩm', 960,560, true)" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                            </Items>
                                        </ext:Menu>
                                    </Menu>
                                </ext:Button>
                                <ext:ToolbarFill>
                                </ext:ToolbarFill>
                                <ext:Button runat="server" ID="btnProfile" Text="vucuongkg" Icon="User">
                                    <Menu>
                                        <ext:Menu>
                                            <Items>
                                                <ext:MenuItem Text="Thay đổi mật khẩu" Icon="Key">
                                                    <Listeners>
                                                        <Click Handler="createWindow('changePassword','Modules/userprofile/changepassword.aspx','Thay đổi mật khẩu', 480,260, true)" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                            </Items>
                                        </ext:Menu>
                                    </Menu>
                                </ext:Button>
                                <ext:ToolbarSeparator>
                                </ext:ToolbarSeparator>
                                <ext:Button ID="Button1" runat="server" Text="Thoát" Icon="LockOpen">
                                    <DirectEvents>
                                        <Click OnEvent="Signout" Before="Ext.Msg.wait('Đang kết thúc phiên làm việc...', 'Thoát');"
                                            Failure="Ext.Msg.show({
                                                                               title:   'Lỗi thoát',
                                                                               msg:     result.errorMessage,
                                                                               buttons: Ext.Msg.OK,
                                                                               icon:    Ext.MessageBox.ERROR
                                                                            });">
                                            <EventMask MinDelay="500" />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Items>
                        <ext:TabPanel ID="pnTabPanel" runat="server" EnableTabScroll="true" Border="false">
                            <Items>
                                <ext:Panel ID="Panel5" runat="server" Title="Home" Border="false" Padding="6" Icon="Star"
                                    AutoScroll="true">
                                    <Content>
                                        <table width="100%" style="font-family: Tahoma; font-size: 11px;">
                                            <%--  <tr>
                                            <td colspan="2" style="padding: 5px;">
                                                <h1 style="border-bottom: 1px solid #C8C8C8; font-size: 24px; color: #4D5764; font-weight: 400;">
                                                    Home</h1>
                                            </td>
                                        </tr>--%>
                                            <tr>
                                                <td align="top" style="padding: 5px;" width="100%" valign="top">
                                                    <div class="tsc_ribbon_wrap edge" style="width: 100%; float: left;">
                                                        <div class="ribbon-wrap left-edge fork lblue">
                                                            <span><b><a href="/default.aspx" style="color: #fff;">Website</a></b></span>
                                                        </div>
                                                        <br />
                                                        <div style="text-align: left; padding-left: 10px;">
                                                            <big>Thống kê</big>
                                                            <br />
                                                            <br />
                                                            <br />
                                                            <div class="tsc_toggle_container" style="width: 98%;">
                                                                <%--     + <a href="#" class="toggleCollapse" rel="style2">expand all</a>--%><br />
                                                                <div class="tsc_toggle style2 tsc_show">
                                                                    <div>
                                                                        <a href="" class="tsc_toggle_link" style="display: block;">Thống kê tin bài</a>
                                                                    </div>
                                                                    <div class="tsc_toggle_box" style="padding-top: 0px; padding-left: 20px;">
                                                                        <%--     The human brain has the capacity to store everything that you experience.--%>
                                                                        <ul class="tsc_list tsc_li_star">
                                                                            <li>Tổng số tin bài: <b>
                                                                                <ext:Label runat="server" ID="lblTotalNewsArtilcle" StyleSpec="vertical-align: top">
                                                                                </ext:Label>
                                                                            </b></li>
                                                                            <li>Tổng số chuyên mục tin bài: <b>
                                                                                <ext:Label runat="server" ID="lblTotalNewsCategory" StyleSpec="vertical-align: top">
                                                                                </ext:Label>
                                                                            </b></li>
                                                                            <li>Tổng số liên kết: <b>
                                                                                <ext:Label runat="server" ID="lblTotalLink" StyleSpec="vertical-align: top">
                                                                                </ext:Label>
                                                                            </b></li>
                                                                            <li>Tổng số film: <b>
                                                                                <ext:Label runat="server" ID="lblTotalFilm" StyleSpec="vertical-align: top">
                                                                                </ext:Label>
                                                                            </b></li>
                                                                        </ul>
                                                                    </div>
                                                                </div>


                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>

                                            </tr>
                                        </table>
                                    </Content>
                                </ext:Panel>
                            </Items>
                            <Plugins>
                                <ext:TabCloseMenu ID="TabCloseMenu1" runat="server" />
                            </Plugins>
                        </ext:TabPanel>
                    </Items>
                </ext:Panel>
            </Items>
        </ext:Viewport>
    </form>
</body>
</html>
